﻿namespace Arbalest.Models
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Runtime.Serialization;
    using System.Xml.Serialization;
    using Arbalest.Web.Controllers;

    /// <summary>
    /// Model class for an OpenId provider
    /// </summary>
    public class OpenIdProvider
    {
        [DisplayName("Code")]
        [Required(ErrorMessage="Code is required")]
        public string Code { get; set; }

        [DisplayName("Name")]
        [Required(ErrorMessage = "Name is required")]
        public string Name { get; set; }
        
        [DisplayName("Url")]
        [Required(ErrorMessage = "Url is required")]
        public string Url { get; set; }
    }

    /// <summary>
    /// Model class for an OpenId user
    /// </summary>
    public class OpenIdUser
    {
        [DisplayName("Id")]
        public long Id { get; set; }

        [DisplayName("DNS")]
        [Required(ErrorMessage = "DNS is required")]
        public string Code { get; set; }

        [DisplayName("Alias")]
        [Required(ErrorMessage = "Alias is required")]
        public string Alias { get; set; }

        [DisplayName("Email")]
        [Required(ErrorMessage = "Email is required")]
        public string Email { get; set; }

        [DisplayName("FullName")]
        [Required(ErrorMessage = "FullName is required")]
        public string FullName { get; set; }
    }
}